#include "stdafx.h"

#include "core/engine.h"

#include "app/test_core.h"
#include "app/test_shaders.h"

#include "core/event.h"
#include "input/keyboard.h"

#include "util/backgroundprocessor.h"

static auto globalLogFile = std::make_unique<std::ofstream>("global.log");

int main() {

	try {
		gLog << "Starting OA";

		natrium::core::Engine engine;

		//engine.setApplication(std::make_unique<natrium::app::TestCore>());
		engine.setApplication(std::make_unique<natrium::app::TestShaders>());
		engine.run();
	
		gLog << "Terminating application";
	}
	catch (std::exception& ex) {
		std::cerr << ex.what() << std::endl;
	}
	catch (...) {
		std::cerr << "Unknown exception" << std::endl;
	}

	return 0;
}